﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using eAssessment.questions;

namespace eAssessment.Classes.Assessments
{
    [Serializable]
    class CreateAssessmentInput : AssessmentActive
    {
        private bool _pointDeduction;

        public bool PointDeduction
        {
            get { return _pointDeduction; }
            set { _pointDeduction = value; }
        }
        private bool _selftest;

        public bool Selftest
        {
            get { return _selftest; }
            set { _selftest = value; }
        }

        private List<int> _questions = new List<int>();

        internal List<int> Questions
        {
            get { return _questions; }
            set { _questions = value; }
        }

        public void AddQuestion(int ID)
        {
            bool alreadyExists = false;
            foreach (int i in _questions)
            {
                if (i == ID)
                {
                    alreadyExists = true;
                    break;
                }
            }
            if (!alreadyExists)
            {
                _questions.Add(ID);
            }
        }


        internal void deleteQuestion(int id)
        {
            _questions.Remove(id);
        }
    }
}
